{include 'common/header.html'}
<body>
<header>
<ul>
<li><a href="{$this->urlCreate('admin','index')}" style="z-index: 50;">管理主页</a></li>
<li><a href="#" style="z-index: 49;">友链管理</a></li>
</ul>
</header>

<div id="main">
<div id="subtitle">友链管理</div>
<div id="box">
{if(empty($links))}
<div id="tip">暂无友链</div>
{else}
<table style="display: block;width: 99%;">
<tr style="width: 100%;"><th style="width: 30%;">标题</th><th style="width: 60%;">URL</th></tr>
{foreach $links as $link}

<tr style="width: 100%;"><td style="text-align: center;">{$link['title']}</td><td style="text-align: center;">{$link['url']}</td><td><a href="{$this->urlCreate('admin','links_delete',array('id'=>$link['id']))}" onclick="return confirm('确定删除？');">删</a></td></tr>

{/foreach}
</table>
{/if}
</div>

<div id="subtitle">添加友链</div>
<div id="box">
<form action="" method="post">
<label for="title">链接标题</label>
<input type="text" id="title" name="title" style="margin: 1em;display: block;" />
<label for="url">网站地址</label>
<input type="url" id="url" name="url" style="margin: 1em;display: block;" value="http://" />
<span style="display: block;margin: 3px 1em 3px;color: red;">{$tip}</span>
<input type="submit" name="submit" value="提交" style="margin: 1em;display: block;width: 64px;height: 24px;margin-left: 3em;" />
</form>
</div>
</div>
{include 'common/footer.html'}
</body>
</html>